package com.parenting.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.parenting.entities.CouponDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.parenting.model.IMPage;
import com.parenting.request.ActivityCouponConsumptionListRequest;
import com.parenting.request.CouponAddRequest;
import com.parenting.request.CouponListSearchCriteriaRequest;
import com.parenting.request.CouponUpdateRequest;
import com.parenting.response.ActivityCouponListResponse;
import com.parenting.response.CouponDetails;
import com.parenting.response.CouponDropDown;
import com.parenting.response.CouponListResponse;

import java.util.List;

/**
 * <p>
 * 优惠券 服务类
 * </p>
 *
 * @author 烟台业达-王世玺
 * @since 2021-08-27
 */
public interface CouponService extends IService<CouponDO> {
    /***
     * 新增优惠券
     * @param couponAddRequest 新增优惠券的对象
     * @param shopId 店铺ID
     */
   void addCoupon(CouponAddRequest couponAddRequest, String shopId);

    /***
     * 用于 优惠券的 修改
     * @param request
     */
    void updateCouponById(CouponUpdateRequest request);

    /****
     * 优惠券分页列表
     * @param request
     * @return
     */
    IMPage <CouponListResponse> getPageListCoupon(CouponListSearchCriteriaRequest request, String ShopId);

    /***
     * 活动优惠券使用情况列表
     * @param request 活动优惠券使用情况查询条件对象
     * @return
     */
    IPage<ActivityCouponListResponse>  getActivityCouponConsumptionList(String shopId,ActivityCouponConsumptionListRequest request);

    /****
     * 查询优惠券详情
     * @param couponId
     * @return
     */
    CouponDetails getCouponByCouponId(String couponId);


    /***
     * 优惠券下拉
     * @param shopId
     * @return
     */
    List<CouponDropDown> getCouponDropDown(String shopId, String type);

 /***
  *  修改优惠券数量
  * @param number
  * @param id
  */
   void updateNumberOfCouponCouponById(int number,String  id );


    /***
     *  加减
     * @param number
     * @param id
     */
    void updateNumberOfCouponCouponById(int number,String  id,String type );

}
